package com.huluobo.a2206douyindemo.adapter;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.huluobo.a2206douyindemo.R;
import com.huluobo.a2206douyindemo.utils.ImageUtils;
import com.huluobo.base.bean.GoodsBeanResult;

/**
 * Created by LC on 2024/8/28.
 */
public class ShopAdapter extends BaseQuickAdapter<GoodsBeanResult.GoodsBean, BaseViewHolder> {
    public ShopAdapter() {
        super(R.layout.item_shop);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, GoodsBeanResult.GoodsBean goodsBean) {
        ImageUtils.getInstance().loadImage(getContext(), goodsBean.getGoods_default_icon(),
                baseViewHolder.getView(R.id.item_shop_goods_icon));
        baseViewHolder.setText(R.id.item_shop_desc, goodsBean.getGoods_desc());
        baseViewHolder.setText(R.id.item_shop_price, goodsBean.getGoods_default_price()+"元");
    }
}
